/**
 * 
 * @param id //省份 table Id
 */
shopTypeId=null;
shopTypeName=null;


function getShopType(id){
	$.ajax({
		type : "get",
		async:false,
		datatype : "json",
		url : "../shopType/find/all",
		success : function(data) {
					var rst = JSON.parse(data);
					var obj = DealAndShowMsg(data,false,false);
					loadShopTypeTable(rst,id);
					
		}	
	});	
}
function loadShopTypeTable(json,id){
	for ( var i = 0; i < json.result.data.length; i++) {
			$("table[id='"+id+"'] tbody").append("<tr></tr>");
		var pId=getHeadIndexValue(i, json, "id");
		var pName=getHeadIndexValue(i, json, "name");
		var htm="<td>"+pName+"</td><td><input class='common_btn' type='button' value='选择' onclick = \"chooseShopType("+pId+",'"+pName+"')\"></td>	";
		$("table[id='"+id+"'] tbody tr:last").append(htm)
		
	}

}

